const mapsettings = {
  serverUrl: "https://iserver.supermap.io",
  tiandituUrl: "https://t0.tianditu.gov.cn",
  gisUrl: "https://gis.leadinsight.cn",
  colour: ["ChinaDark", "China"],
  dark: "ChinaDark",
  light: "China",
  linecolor: "rgba(255, 255,0, 1)",
  EJLX_CODEfillcolor: [
    "match",
    ["get", "EJLX_CODE"], //二级地类
    "0101", //水田
    "#3FA8AD",
    "0102", //水浇地
    "#CDD00A",
    "0103",  //旱地
    "#CB6D16",
    "0201",  //果园
    "#F50000",
    "0202",  //茶园
    "#C5CB48",
    "0204",  //其它园地
    "#B14356",
    "0307",  //其它林地
    "#C5CB48",
    "0404",  //其它草地
    "#3de600",
    "1104A",  //鱼塘
    "#3A5BD2",
    "214543",//鱼苗塘
    "#3A5BD2",
    "#0d0d0d"
  ],
  YJLX_CODEfillcolor: [
    "match",
    ["get", "YJLX_CODE"], //一级地类
    "01",    //耕地
    "#222222",
    "02",    //种植园用地
    "#FC8452",
    "03",  //林地
    "#C5CB48",
    "04",  //草地
    "#3de600",
    "11",  //水域
    "#3A5BD2",
    "#222222"
  ],
  // center: [113.02151029197415, 22.900558123212093],
  center: [113.0179631, 23.059959],
  zoom: 17,
  tiandituToken: '53601310a9c2ea79748468191c57382a',
  accessToken: "pk.eyJ1IjoieWItd2FuZyIsImEiOiJja25qcWM2NnQwMzRuMm9sYjBtNTd0dmIyIn0.9xYWDRJQwshRfrz3JRECXA",
}
function getZoom() {
  let zoom, userInfo
  if (localStorage.getItem('userInfo')) {
    userInfo = JSON.parse(localStorage.getItem('userInfo'))
    switch (userInfo.userLevel) {
      case 3:
        mapsettings.zoom = 11;
        break
      case 4:
        mapsettings.zoom = 13
        break
      case 5:
        mapsettings.zoom = 17
        break
    }
  }
}

getZoom()
module.exports = mapsettings